{% extends 'base.html' %}
{% block main-wrapper %}
<div class="main-wrapper">
    <div class="title">
        <span>
            最新博客
        </span>
        <svg width="31" height="31" viewBox="0 0 31 31" fill="none" xmlns="http://www.w3.org/2000/svg">
            <path d="M25.8333 5.16666H5.16668C3.73293 5.16666 2.59626 6.31624 2.59626 7.74999L2.58334 23.25C2.58334 24.6837 3.73293 25.8333 5.16668 25.8333H25.8333C27.2671 25.8333 28.4167 24.6837 28.4167 23.25V7.74999C28.4167 6.31624 27.2671 5.16666 25.8333 5.16666ZM10.9792 19.375H9.42918L6.13543 14.8542V19.375H4.52084V11.625H6.13543L9.36459 16.1458V11.625H10.9792V19.375ZM17.4375 13.2525H14.2083V14.6992H17.4375V16.3267H14.2083V17.7604H17.4375V19.375H12.2708V11.625H17.4375V13.2525ZM26.4792 18.0833C26.4792 18.7937 25.8979 19.375 25.1875 19.375H20.0208C19.3104 19.375 18.7292 18.7937 18.7292 18.0833V11.625H20.3438V17.4504H21.8033V12.9037H23.4179V17.4375H24.8646V11.625H26.4792V18.0833Z"
                  fill="#4490D6"></path>
        </svg>
    </div>
    <section class="posts">
    {% load filter %}
        {% for post in post_list %}
            <div class="post-item">
                <div class="create-date">
                    <span class="day">{{ post.create_time|date:"d"|mod }}</span>
                    <span class="month">{{ post.create_time|date:"Y-m" }}</span>
                </div>
                <div class="post">
                    <div class="title">{{ post.title }}</div>
                    <div class="tags">
                        <i class="fa fa-tags"></i>
                        {% for tag in post.tags.all %}
                            <span class="tag-item"><a href="">{{ tag.tag_name }} </a></span>

                        {% endfor %}


                    </div>
                    <p class="content">
                        {{ post.describe }}
                    </p>
                    <div class="bottom">
                        <div class="visitor">
                            <i class="fa fa-eye"></i>
                            <span class="visitor_num">{{ post.visitor_num }}</span>
                        </div>
                        <button><a href="detail.html">阅读原文</a></button>

                    </div>
                </div>

            </div>
        {% endfor %}


    </section>
</div>
{% endblock %}
